package com.deyuanyun.pic.ctrl.controller.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.deyuanyun.pic.common.util.StringUtils;
import com.deyuanyun.pic.ctrl.enumeration.EqptRunningStatedEnum;
import com.deyuanyun.pic.settings.support.utils.BaseCodeUtils;

import java.math.BigDecimal;
import java.util.Date;

/**
 *  阴保电源基础信息---适用于运行记录列表展示所用
 *  @author axiao(xj08.dream@gmail.com)
 *  @date 2016-09-18
 *  @version 1.0
 *  Histroy: [修改人][时间][描述]
 */
public class EqptCppowerDTO {

    private String id;

    /**
     * 设备编号
     */
    private String customNumber;

    private String pipeValveroomName;//所属场站阀室名称

    private String pipeValveroomId;//所属场站阀室id

    private String cppowerType;//阴保电源类型

    private BigDecimal ratedvoltsOut;//额定电压（V）

    private BigDecimal ratedampsout; //额定电流(A)

    private String protectionObject; //阴保保护对象

    private String operationStatus;//运行状态

    private Double operationRate; //运行率

    private Date inserviceDate;//投用时间

    private Boolean isHavRecord; //是否有运行记录

    public String getCustomNumber() {
        return customNumber;
    }

    public void setCustomNumber(String customNumber) {
        this.customNumber = customNumber;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCppowerType() {
        return BaseCodeUtils.getName(cppowerType);
    }

    public void setCppowerType(String cppowerType) {
        this.cppowerType = cppowerType;
    }

    public Double getOperationRate() {
        return operationRate;
    }

    public void setOperationRate(Double operationRate) {
        this.operationRate = operationRate;
    }

    public String getOperationStatus() {
        if(StringUtils.isNotEmpty(operationStatus))
            return EqptRunningStatedEnum.valueOf(operationStatus).getLabel();
        return operationStatus;
    }

    public void setOperationStatus(String operationStatus) {
        this.operationStatus = operationStatus;
    }

    public String getPipeValveroomId() {
        return pipeValveroomId;
    }

    public void setPipeValveroomId(String pipeValveroomId) {
        this.pipeValveroomId = pipeValveroomId;
    }

    public String getPipeValveroomName() {
        return pipeValveroomName;
    }

    public void setPipeValveroomName(String pipeValveroomName) {
        this.pipeValveroomName = pipeValveroomName;
    }

    public String getProtectionObject() {
        return BaseCodeUtils.getName(protectionObject);
    }

    public void setProtectionObject(String protectionObject) {
        this.protectionObject = protectionObject;
    }

    public BigDecimal getRatedampsout() {
        return ratedampsout;
    }

    public void setRatedampsout(BigDecimal ratedampsout) {
        this.ratedampsout = ratedampsout;
    }

    public BigDecimal getRatedvoltsOut() {
        return ratedvoltsOut;
    }

    public void setRatedvoltsOut(BigDecimal ratedvoltsOut) {
        this.ratedvoltsOut = ratedvoltsOut;
    }

    public Date getInserviceDate() {
        return inserviceDate;
    }

    public void setInserviceDate(Date inserviceDate) {
        this.inserviceDate = inserviceDate;
    }

    public Boolean getHavRecord() {
        return isHavRecord;
    }

    public void setHavRecord(Boolean havRecord) {
        isHavRecord = havRecord;
    }
}
